
<form name="editForm" role="form" novalidate ng-submit="vm.save()" show-validation>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myBankAccountLabel" data-translate="jhipsterSampleApplicationApp.bankAccount.home.createOrEditLabel">Create or edit a Bank Account</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.bankAccount.id">
            <label for="id" data-translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.bankAccount.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhipsterSampleApplicationApp.bankAccount.name" for="field_name">Name</label>
            <input type="text" class="form-control" name="name" id="field_name"
                    ng-model="vm.bankAccount.name"
                    required />
            <div ng-show="editForm.name.$invalid">
                <p class="help-block"
                    ng-show="editForm.name.$error.required" data-translate="entity.validation.required">
                    This field is required.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhipsterSampleApplicationApp.bankAccount.balance" for="field_balance">Balance</label>
            <input type="number" class="form-control" name="balance" id="field_balance"
                    ng-model="vm.bankAccount.balance"
                    required />
            <div ng-show="editForm.balance.$invalid">
                <p class="help-block"
                    ng-show="editForm.balance.$error.required" data-translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.balance.$error.number" data-translate="entity.validation.number">
                    This field should be a number.
                </p>
            </div>
        </div>

        <div class="form-group">
            <label data-translate="jhipsterSampleApplicationApp.bankAccount.user" for="field_user">User</label>
            <select class="form-control" id="field_user" name="user" ng-model="vm.bankAccount.user" ng-options="user as user.login for user in vm.users track by user.id">
                <option value=""></option>
            </select>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span data-translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span data-translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
